# Install Apps
import os
from dotenv import load_dotenv

load_dotenv('.env', verbose=True)


app_str = os.environ.get('APP_LIST')
APP_LIST = app_str.split(',')

INSTALLED_APPS = [
    'simpleui',

    # cross domain
    'corsheaders',

    # common
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    # drf module
    'rest_framework',

    # time work
    'django_apscheduler',

    # export function
    'import_export',

    # https://django-filter.readthedocs.io/en/stable/guide/install.html
    'django_filters',

    # 自动化生成文档
    'drf_yasg',

    # django extensions
    'django_extensions'
]

for app in APP_LIST:
    INSTALLED_APPS.append(f"apps.{app}")

INTERNAL_IPS = [
    # ...
    "*",
    # ...
]
